#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
using namespace std;
class A
{
public:
	virtual void  a()
	{
		cout << "A" << endl;
	}
	virtual ~A()
	{
		cout << "~A" << endl;
	}
};
class b :public A
{
public:
	virtual void a()
	{
		cout << "b" << endl;
	}
	~b()
	{
		delete[] arr;
		cout << "~b" << endl;
	}
private:
	int* arr = new int[10];
};
class D
{
public:
	virtual void  d()
	{
		cout << "dadad" << endl;
	}
};
class E:public D
{
public:
	virtual void d() override
	{
		cout << "dada" << endl;
	}
};
class F
{
public:
	virtual void ff() = 0;

};
class G :public F
{
	virtual void ff()
	{
		cout << "dada" << endl;
	}
};
class Base
{
public:
	virtual void Func1()
	{
		cout << "Func1()" << endl;
	}
protected:
	int _b = 1;
	char _ch = 'x';
};
int main()
{
	A* ptr1 = new A;
	A* ptr2 = new b;
	ptr1->a();
	ptr2->a();

	delete ptr1;
	delete ptr2;
	Base s1;
	return 0;
}